package star.cloud.asme.base.utils;

import java.util.Collection;

public class ObjectsUtil {
    public static boolean isNull(Object obj) {
        return obj == null;
    }

    public static boolean isNullOrEmpty(Object obj) {
        return obj == null || obj == "";
    }

    public static boolean isNullOrEmpty(Collection objects) {
        return objects == null || objects.isEmpty();
    }

    public static boolean noNull(Object obj) {
        return obj != null;
    }

    public static boolean noNullAndEmpty(Object obj) {
        return obj != null && obj != "";
    }

    public static boolean noNullAndEmpty(Collection objects) {
        return objects != null && !objects.isEmpty();
    }
}